package com.designPattern.decorator.decoratorImpl;

import com.designPattern.decorator.component.Beverage;
import com.designPattern.decorator.decorator.CondimentDecorator;

/**
 * 奶油调料
 */
public class Whip extends CondimentDecorator {
	//被装饰者，饮料基类
	Beverage beverage;
	
	public Whip(Beverage beverage){
		this.beverage = beverage;
	}
	
	@Override
	public String getDescription() {
		return beverage.getDescription() + ", Whip";
	}

	@Override
	public Double cost() {
		return 0.52 + beverage.cost();
	}

}
